Optimal. Leaf size=108 \[ -\frac{\left (a^2+b^2\right ) \cot (c+d x)}{a^3 d}-\frac{b \left (a^2+b^2\right ) \log (\tan (c+d x))}{a^4 d}+\frac{b \left (a^2+b^2\right ) \log (a+b \tan (c+d x))}{a^4 d}+\frac{b \cot ^2(c+d x)}{2 a^2 d}-\frac{\cot ^3(c+d x)}{3 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.104453, antiderivative size = 108, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3516, 894} \[ -\frac{\left (a^2+b^2\right ) \cot (c+d x)}{a^3 d}-\frac{b \left (a^2+b^2\right ) \log (\tan (c+d x))}{a^4 d}+\frac{b \left (a^2+b^2\right ) \log (a+b \tan (c+d x))}{a^4 d}+\frac{b \cot ^2(c+d x)}{2 a^2 d}-\frac{\cot ^3(c+d x)}{3 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3516
Rule 894
Rubi steps
\begin{align*} \int \frac{\csc ^4(c+d x)}{a+b \tan (c+d x)} \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{b^2+x^2}{x^4 (a+x)} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac{b \operatorname{Subst}\left (\int \left (\frac{b^2}{a x^4}-\frac{b^2}{a^2 x^3}+\frac{a^2+b^2}{a^3 x^2}+\frac{-a^2-b^2}{a^4 x}+\frac{a^2+b^2}{a^4 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac{\left (a^2+b^2\right ) \cot (c+d x)}{a^3 d}+\frac{b \cot ^2(c+d x)}{2 a^2 d}-\frac{\cot ^3(c+d x)}{3 a d}-\frac{b \left (a^2+b^2\right ) \log (\tan (c+d x))}{a^4 d}+\frac{b \left (a^2+b^2\right ) \log (a+b \tan (c+d x))}{a^4 d}\\ \end{align*}
Mathematica [A] time = 0.455689, size = 95, normalized size = 0.88 \[ \frac{-2 \cot (c+d x) \left (a^3 \csc ^2(c+d x)+2 a^3+3 a b^2\right )-6 b \left (a^2+b^2\right ) (\log (\sin (c+d x))-\log (a \cos (c+d x)+b \sin (c+d x)))+3 a^2 b \csc ^2(c+d x)}{6 a^4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.076, size = 144, normalized size = 1.3 \begin{align*} -{\frac{1}{3\,ad \left ( \tan \left ( dx+c \right ) \right ) ^{3}}}-{\frac{1}{ad\tan \left ( dx+c \right ) }}-{\frac{{b}^{2}}{d{a}^{3}\tan \left ( dx+c \right ) }}+{\frac{b}{2\,{a}^{2}d \left ( \tan \left ( dx+c \right ) \right ) ^{2}}}-{\frac{b\ln \left ( \tan \left ( dx+c \right ) \right ) }{{a}^{2}d}}-{\frac{{b}^{3}\ln \left ( \tan \left ( dx+c \right ) \right ) }{d{a}^{4}}}+{\frac{b\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{{a}^{2}d}}+{\frac{{b}^{3}\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d{a}^{4}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.06377, size = 131, normalized size = 1.21 \begin{align*} \frac{\frac{6 \,{\left (a^{2} b + b^{3}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{4}} - \frac{6 \,{\left (a^{2} b + b^{3}\right )} \log \left (\tan \left (d x + c\right )\right )}{a^{4}} + \frac{3 \, a b \tan \left (d x + c\right ) - 6 \,{\left (a^{2} + b^{2}\right )} \tan \left (d x + c\right )^{2} - 2 \, a^{2}}{a^{3} \tan \left (d x + c\right )^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.15412, size = 500, normalized size = 4.63 \begin{align*} -\frac{2 \,{\left (2 \, a^{3} + 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 3 \, a^{2} b \sin \left (d x + c\right ) + 3 \,{\left (a^{2} b + b^{3} -{\left (a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) \sin \left (d x + c\right ) - 3 \,{\left (a^{2} b + b^{3} -{\left (a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac{1}{4} \, \cos \left (d x + c\right )^{2} + \frac{1}{4}\right ) \sin \left (d x + c\right ) - 6 \,{\left (a^{3} + a b^{2}\right )} \cos \left (d x + c\right )}{6 \,{\left (a^{4} d \cos \left (d x + c\right )^{2} - a^{4} d\right )} \sin \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18105, size = 194, normalized size = 1.8 \begin{align*} -\frac{\frac{6 \,{\left (a^{2} b + b^{3}\right )} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{a^{4}} - \frac{6 \,{\left (a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{4} b} - \frac{11 \, a^{2} b \tan \left (d x + c\right )^{3} + 11 \, b^{3} \tan \left (d x + c\right )^{3} - 6 \, a^{3} \tan \left (d x + c\right )^{2} - 6 \, a b^{2} \tan \left (d x + c\right )^{2} + 3 \, a^{2} b \tan \left (d x + c\right ) - 2 \, a^{3}}{a^{4} \tan \left (d x + c\right )^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]